package com.baichang.taoshunda.service;

import com.baichang.framework.excelption.ServiceException;

import java.util.List;
import java.util.Map;

/**
 * Created by ${wushenglu} on 2018/3/12.
 */
public interface InvoiceService {
    /**
     * 添加发票信息
     *
     * @param invoiceHead   抬头
     * @param invoiceNumber 税号
     * @param invoiceType   发票类型
     * @param userId        用户编号
     * @return
     */
    boolean addInvoice(String invoiceHead, String invoiceNumber, Integer invoiceType, Integer userId);

    /**
     * 修改发票信息
     *
     * @param invoiceHead
     * @param invoiceNumber
     * @param invoiceType
     * @param userId
     * @param invoiceId
     * @return
     */
    boolean updateInvoiceInfo(String invoiceHead, String invoiceNumber, Integer invoiceType, Integer userId, Integer invoiceId) throws ServiceException;

    /**
     * 删除发票
     *
     * @param invoiceId
     * @return
     */
    boolean deleteInvoice(Integer invoiceId);

    /**
     * 查询所有的发票信息
     *
     * @param userId
     * @return
     */
    List<Map<String, Object>> findInvoiceList(Integer userId);

    /**
     * 查询最新添加的发票信息
     *
     * @param userId
     * @return
     */
    Map<String, Object> getInvoiceInfo(Integer userId);
}
